<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.virtualization.VirtualMachine</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        <a href="simvoc.core.virtualization-module.html">Module&nbsp;virtualization</a> ::
        Class&nbsp;VirtualMachine
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class VirtualMachine</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_simvoc_c_52" name="uml_class_diagram_for_simvoc_c_52">
<area shape="rect" id="node122" href="simvoc.core.virtualization.VirtualMachine-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,228,671,247"/>
<area shape="rect" id="node122" href="simvoc.core.virtualization.VirtualMachine-class.html#booted_evt" title="Receives a simulator event when the VM is in the booted state (after a boot delay specified as a property of the image)." alt="" coords="17,247,671,265"/>
<area shape="rect" id="node122" href="simvoc.core.virtualization.VirtualMachine-class.html#notify_shutdown_evt" title="Receives an event from the simulator when the VM instance is to be shut &#160;down." alt="" coords="17,265,671,284"/>
<area shape="rect" id="node122" href="simvoc.core.virtualization.VirtualMachine-class.html#adjust_length" title="Adjusts the length of a job at start time, in order to account for the &#160;overhead added by virtualization." alt="" coords="17,284,671,303"/>
<area shape="rect" id="node1" href="simvoc.core.virtualization.VirtualMachine-class.html" title="Representation of a virtual machine (guest system) *instance*." alt="" coords="5,195,683,309"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#claim" title="Marks the machine as claimed for scheduling purposes" alt="" coords="224,39,463,57"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#free" title="Marks the machine as free (unclaimed) for scheduling purposes" alt="" coords="224,57,463,76"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#shut_down" title="Shuts down the machine, killing any job that happens to be running at the &#160;time." alt="" coords="224,76,463,95"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#add_capability" title="Adds a machine&#45;specific capability to the simulated machine (e.g." alt="" coords="224,95,463,113"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#get_capability" title="Returns: &#160;instance of an object providing a named capability, or None if this machine does not provide the requested service" alt="" coords="224,113,463,132"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#remove_capability" title="Removes a capability from this machine." alt="" coords="224,132,463,151"/>
<area shape="rect" id="node123" href="simvoc.core.cluster_sim.Machine-class.html#__str__" title="str(x)" alt="" coords="224,151,463,169"/>
<area shape="rect" id="node2" href="simvoc.core.cluster_sim.Machine-class.html" title="Simulated cluster node." alt="" coords="212,6,473,175"/>
</map>
  <img src="uml_class_diagram_for_simvoc_c_52.gif" alt='' usemap="#uml_class_diagram_for_simvoc_c_52" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Representation of a virtual machine (guest system) *instance*. The VM 
  may add execution overhead to a job, resulting in a longer execution 
  length.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.virtualization.VirtualMachine-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">image</span>,
        <span class="summary-sig-arg">state_callback</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">cpu_overhead</span>=<span class="summary-sig-default">0.0</span>,
        <span class="summary-sig-arg">net_overhead</span>=<span class="summary-sig-default">0.0</span>,
        <span class="summary-sig-arg">net_bound</span>=<span class="summary-sig-default">50</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.virtualization.VirtualMachine-class.html#booted_evt" class="summary-sig-name">booted_evt</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">time</span>,
        <span class="summary-sig-arg">sim</span>)</span><br />
      Receives a simulator event when the VM is in the booted state (after 
      a boot delay specified as a property of the image).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.booted_evt">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.virtualization.VirtualMachine-class.html#notify_shutdown_evt" class="summary-sig-name">notify_shutdown_evt</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">time</span>,
        <span class="summary-sig-arg">sim</span>,
        <span class="summary-sig-arg">signum</span>=<span class="summary-sig-default">15</span>)</span><br />
      Receives an event from the simulator when the VM instance is to be 
      shut down.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.notify_shutdown_evt">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">number</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.virtualization.VirtualMachine-class.html#adjust_length" class="summary-sig-name">adjust_length</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">length</span>,
        <span class="summary-sig-arg">cpu</span>,
        <span class="summary-sig-arg">net</span>)</span><br />
      Adjusts the length of a job at start time, in order to account for 
      the overhead added by virtualization.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.adjust_length">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#add_capability" class="summary-sig-name">add_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>,
        <span class="summary-sig-arg">cap_obj</span>)</span><br />
      Adds a machine-specific capability to the simulated machine (e.g.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.add_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="claim"></a><span class="summary-sig-name">claim</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Marks the machine as claimed for scheduling purposes
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.claim">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="free"></a><span class="summary-sig-name">free</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Marks the machine as free (unclaimed) for scheduling purposes
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.free">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#get_capability" class="summary-sig-name">get_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>)</span><br />
      Returns:
      instance of an object providing a named capability, or None if this 
      machine does not provide the requested service
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.get_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#remove_capability" class="summary-sig-name">remove_capability</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cap_name</span>)</span><br />
      Removes a capability from this machine.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.remove_capability">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Machine-class.html#shut_down" class="summary-sig-name">shut_down</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">time</span>,
        <span class="summary-sig-arg">simobj</span>)</span><br />
      Shuts down the machine, killing any job that happens to be running at
      the time.
      <em>(Inherited from <a href="simvoc.core.cluster_sim.Machine-class.html">simvoc.core.cluster_sim.Machine</a>)</em></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Machine.shut_down">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">image</span>,
        <span class="sig-arg">state_callback</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">cpu_overhead</span>=<span class="sig-default">0.0</span>,
        <span class="sig-arg">net_overhead</span>=<span class="sig-default">0.0</span>,
        <span class="sig-arg">net_bound</span>=<span class="sig-default">50</span>,
        <span class="sig-arg">**kwds</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the VM instance</li>
        <li><strong class="pname"><code>image</code></strong> - VMImage used to spawn the VM instance</li>
        <li><strong class="pname"><code>state_callback</code></strong> - Machine state callback (see <a 
          href="simvoc.core.cluster_sim.Machine-class.html" 
          class="link">cluster_sim.Machine</a>)</li>
        <li><strong class="pname"><code>cpu_overhead</code></strong> (float) - Amount of overhead, expressed as a floating-point value (e.g. 0.1
          for 10%), added to CPU-bound jobs that have a network fraction of
          0%</li>
        <li><strong class="pname"><code>net_overhead</code></strong> (float) - Amount of overhead, expressed as a floating-point value, added to
          network-bound jobs that have a network fraction of at least 
          net_bound percent</li>
        <li><strong class="pname"><code>net_bound</code></strong> (number) - Percentage of network fractional level (100 - cpu) at which a job
          is considered to be network-bound. This value is expressed as a 
          floating-point or integer whole percentage number (e.g. 10 for 
          10%)</li>
        <li><strong class="pname"><code>kwds</code></strong> - Extra data for the Machine instance</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="booted_evt"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">booted_evt</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">time</span>,
        <span class="sig-arg">sim</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.booted_evt">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Receives a simulator event when the VM is in the booted state (after a
  boot delay specified as a property of the image). If the VM has not been 
  killed, it will set its state to &quot;free&quot; (resulting in a 
  callback, if the callback function was set in the constructor) and then 
  join the scheduler instance specified by the VM image.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>time</code></strong> (number) - Time at which VM has booted</li>
        <li><strong class="pname"><code>sim</code></strong> - Reference to the simulator object</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>simulator result collection</dd>
  </dl>
</td></tr></table>
</div>
<a name="notify_shutdown_evt"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">notify_shutdown_evt</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">time</span>,
        <span class="sig-arg">sim</span>,
        <span class="sig-arg">signum</span>=<span class="sig-default">15</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.notify_shutdown_evt">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Receives an event from the simulator when the VM instance is to be 
  shut down. A shutdown can be &quot;normal&quot; or &quot;abnormal&quot;. 
  In a normal shutdown, the VM is removed from the scheduler pool of the 
  associated scheduler. In the case of an abnormal shutdown, the VM is 
  *not* removed from the scheduler pool, which will result in scheduling 
  inefficiencies similar to those that would be experienced on a real 
  scheduler when a target node fails unexpectedly.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>time</code></strong> (number) - Termination time</li>
        <li><strong class="pname"><code>sim</code></strong> - Reference to the simulator object</li>
        <li><strong class="pname"><code>signum</code></strong> (int) - Signal number (PJ_STOP for normal shutdown, any other value for 
          an abnormal shutdown -- see <a 
          href="simvoc.core.core_common-module.html" 
          class="link">core_common</a>)</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>simulator result collection</dd>
  </dl>
</td></tr></table>
</div>
<a name="adjust_length"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">adjust_length</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">length</span>,
        <span class="sig-arg">cpu</span>,
        <span class="sig-arg">net</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.virtualization-pysrc.html#VirtualMachine.adjust_length">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adjusts the length of a job at start time, in order to account for the
  overhead added by virtualization. The CPU and network levels of the job 
  are used, along with the overhead parameters specified in the 
  constructor, to increase the job length by some fractional amount. A 
  linear interpolation is performed using the CPU-bound overhead, 
  network-bound overhead, and network-bound threshold parameters.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>length</code></strong> (number) - Original length of the job</li>
        <li><strong class="pname"><code>cpu</code></strong> (number) - Percentage of job spent utilizing the CPU (whole value, such as 
          10 for 10%, as an int or float)</li>
        <li><strong class="pname"><code>net</code></strong> (number) - Percentage of job spent sending and receiving data over the 
          network (also expressed as a whole value, using an int or float).
          Note that there is an unchecked assumption that cpu + net = 100</li>
    </ul></dd>
    <dt>Returns: number</dt>
        <dd>newly adjusted length of the job</dd>
    <dt>Overrides:
        <a href="simvoc.core.cluster_sim.Machine-class.html#adjust_length">cluster_sim.Machine.adjust_length</a>
    </dt>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:33 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
